This invention relates to an image synthesis system and, more particularly, to an image synthesis system and method for combining image data that has been compressed by MPEG (Moving Picture Experts Group) coding and image data that has been compressed by run-length coding.
FIG. 8 is a diagram useful in describing an image synthesis system predicated on the present invention. In an image synthesis system predicated on the present invention, as illustrated in FIG. 8, main image data that has been compressed by MPEG coding and subordinate image data such as video or karaoke subtitles that has been compressed by the run-length method are each decoded, subjected to processing to combine the translucent images and then reproduced in the form of a display.
With the MPEG system, the reconstructed image is stored in an image-data buffer in such a manner that it may be referred to as an image for predicting the next frame in order to apply motion compensation.
Various problems have been encountered in the prior art in the course of the investigation toward the present invention.
In a case where decoding processing such as MPEG decoding and run-length decoding and synthesis processing is implemented by software, however, the prior art is such that processing for combining the subordinate image with the main image is executed using the image-data buffer in which the MPEG-decoded image data has been stored. As a consequence, the reconstructed image that was stored in the image-data buffer following MPEG decoding is rewritten. Since the reconstructed image of the main image in the image-data buffer is thus combined with the subordinate image, a reconstructed image stored in the image-data buffer cannot be referred to as an image for predicting the next frame at the time of MPEG decoding.
Some personal computers come equipped with hardware for MPEG decoding and display moving pictures in accordance with the MPEG standard. Such personal computers cannot execute processing for combining translucent main and subordinate images unless the CPU has enough processing capability. For this reason, there are instances where the display unit of the personal computer is provided with special hardware.
Accordingly, an object of the present invention is to provide an image synthesis system and method which can be realized by software only without the provision of special hardware and which reduce the load associated with synthesis processing.
According to an aspect of the present invention, there is provided an image synthesis system for combining main image data that has been compressed by an MPEG method and subordinate image data that has been compressed by a method different from the MPEG method, the system comprising: a motion compensation processor decompressing, on a per-macroblock basis, I-, P- and B-pictures of the main image data, which has first been subjected to inverse quantization and inverse DCT processing; a macroblock storage unit storing a macroblock of the I-picture of the main image data; and a subordinate-image macroblock, generator converting the subordinate image data to an MPEG macroblock, translucently combining data of a macroblock having a portion which overlaps the subordinate image and data of a macroblock that has been stored in the macroblock storage unit, and creating data of the translucently combined macroblocks as a macroblock of the B-picture, which is decompressed by the motion compensation processor.
Thus, the image of a created B-picture combined with a subordinate image is decompressed by the motion compensation processor. This makes it possible to reconstruct a synthesized image. In addition, the load of synthesis processing is reduced and it is no longer necessary to provide special hardware for the display unit of a personal computer equipped with an MPEG decoder.
Further, according to a second aspect of the present invention, there is provided an image synthesis system for combining main image data that has been compressed by an MPEG method and subordinate image data that has been compressed by a method different from the MPEG method, the system comprising: a motion compensation (MC) processor decompressing, on a per-macroblock basis, I-, P- and B-pictures of the main image data, which has first been subjected to inverse quantization and inverse DCT processing, and performing control in such a manner that use is not made of reference I and P-pictures among the I- and P-pictures; a macroblock storage unit storing a macroblock of the I-picture of the main image data; and a subordinate-image macroblock generator for converting the subordinate image data to an MPEG macroblock, translucently combining data of a macroblock having a portion which overlaps the subordinate image and data of a macroblock that has been stored in the macroblock storage unit, and creating and decompressing data of the translucently combined macroblocks as macroblocks of the reference I- and P-pictures not utilized by the motion compensation processor.
Thus, the images of created I- and P-pictures combined with a subordinate image are decompressed by the motion compensation processor. This makes it possible to reconstruct a synthesized image. In addition, the load of synthesis processing is reduced and it is no longer necessary to provide special hardware for the display unit of a personal computer equipped with an MPEG decoder.
Preferably, the subordinate image may be compressed by run-length coding. The subordinate image thus compressed by run-length coding is used for, e.g., the subtitles of video or karaoke.
Preferably, in case of a synthesis ratio in which there are 16 contrast values of 0 to 15, processing for translucently combining data is executed in accordance with the following:
Y3=[kxc3x97(Y1xe2x88x92Y2)]÷16
U3=[kxc3x97(U1xe2x88x92U2)]÷16
V3=[kxc3x97(V1xe2x88x92V2)]÷16
where k=contrast value+1 (provided that k=0 holds when contrast value=0);
and the following hold:
Y1, U1, V1: chrominance data of main image
Y2, U2, V2: chrominance data of subordinate image
Y3, U3, V3: difference data after synthesis
This makes it possible to reduce the load imposed by processing for translucently combining data.
Preferably, the macrob lock storage unit stores the output of the motion compensation processor 124, thereby making it possible to create subordinate image data.
Further, according to a third aspect of the present invention, there is provided an image synthesis method for combining main image data that has been compressed by an MPEG method and subordinate image data that has been compressed by a method different from the MPEG method, the system comprising the steps of: decompressing, on a per-macroblock basis, I-, P- and B-pictures of the main image data, which has first been subjected to inverse quantization and inverse DCT processing; storing a macroblock of the I-picture of the main image data; and converting the subordinate image data to an MPEG macroblock, translucently combining data of a macroblock having a portion which overlaps the subordinate image and data of a macroblock that has been stored, and decompressing data of the translucently combined macroblocks as a macroblock of the B-picture at the time of decompression.
The image synthesis method is typically performed using a corresponding program or program product which may be carried on a medium in a computer readable fashion.
Thus, as set forth above, the image of a created B-picture combined with a subordinate image is decompressed by the motion compensation processor. This makes it possible to reconstruct a synthesized image. In addition, the load of synthesis processing is reduced and it is no longer necessary to provide special hardware for the display unit of a personal computer equipped with an MPEG decoder.